package com.ui.design.view.waterviewexpend;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.ui.design.R;
import com.ui.design.main.base.BaseActivity;
import com.ui.design.main.constants.Constants;
import com.ui.design.view.waterviewexpend.view.CircleWaveView;
import com.ui.design.view.waterviewexpend.view.ThirdCircleWaveView;

@Route(path = Constants.WaveViewExpend)
public class WaterWaveExpandActivity extends BaseActivity {

    private CircleWaveView circleView;//二层水波纹

    private ThirdCircleWaveView thirdCircleWaveView;//三层水波纹

    @Override
    protected int initLayout() {
        return R.layout.activity_water_wave_expand;
    }

    @Override
    protected void initView() {

        circleView=findViewById(R.id.circle);
        thirdCircleWaveView=findViewById(R.id.circle_third);
    }

    @Override
    protected void initData() {

        circleView.start();
        circleView.setOnClickListener(v -> {
            if (!circleView.getState()){
                circleView.start();
            }else {
                circleView.stop();
            }
        });
        thirdCircleWaveView.start();
        thirdCircleWaveView.setOnClickListener(v -> {
            if (!thirdCircleWaveView.getState()){
                thirdCircleWaveView.start();
            }else {
                thirdCircleWaveView.stop();
            }
        });
    }
}